package com.codingfuture.service.impl;

import com.codingfuture.entity.Course;
import com.codingfuture.mapper.CourseMapper;
import com.codingfuture.service.CourseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class CourseServiceImpl implements CourseService {

    @Autowired
    private CourseMapper courseMapper;

    @Override
    public List<Course> list() {
        return courseMapper.findAll();
    }

    @Override
    public int add(Course course) {
        return courseMapper.insert(course);
    }
}
